package net.kuratkoo.jidelnicekvut;

public class MyHttpClientException extends Exception {

    private String localizedMessage = null;

    public MyHttpClientException(String message) {
        super(message);
    }

    public MyHttpClientException(String message, Throwable cause) {
        super(message, cause);
    }

    public MyHttpClientException(String message, String localizedMessage, Throwable cause) {
        super(message, cause);
        this.localizedMessage = localizedMessage;
    }

    @Override
    public String getLocalizedMessage() {
        if (this.localizedMessage == null) {
            return getMessage();
        } else {
            return this.localizedMessage;
        }
    }
}
